/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Harold
 */
@Entity
@Table(name = "in_color")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "InColor.findAll", query = "SELECT i FROM InColor i"),
    @NamedQuery(name = "InColor.findByIdColor", query = "SELECT i FROM InColor i WHERE i.idColor = :idColor"),
    @NamedQuery(name = "InColor.findByIdGlobalCode", query = "SELECT i FROM InColor i WHERE i.idGlobalCode = :idGlobalCode"),
    @NamedQuery(name = "InColor.findByDigit", query = "SELECT i FROM InColor i WHERE i.digit = :digit"),
    @NamedQuery(name = "InColor.findByDescription", query = "SELECT i FROM InColor i WHERE i.description = :description"),
    @NamedQuery(name = "InColor.findByStatus", query = "SELECT i FROM InColor i WHERE i.status = :status")})
public class InColor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_color")
    private Integer idColor;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_global_code")
    private int idGlobalCode;
    @Basic(optional = false)
    @NotNull
    @Column(name = "digit")
    private int digit;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "status")
    private boolean status;

    public InColor() {
    }

    public InColor(Integer idColor) {
        this.idColor = idColor;
    }

    public InColor(Integer idColor, int idGlobalCode, int digit, String description, boolean status) {
        this.idColor = idColor;
        this.idGlobalCode = idGlobalCode;
        this.digit = digit;
        this.description = description;
        this.status = status;
    }

    public Integer getIdColor() {
        return idColor;
    }

    public void setIdColor(Integer idColor) {
        this.idColor = idColor;
    }

    public int getIdGlobalCode() {
        return idGlobalCode;
    }

    public void setIdGlobalCode(int idGlobalCode) {
        this.idGlobalCode = idGlobalCode;
    }

    public int getDigit() {
        return digit;
    }

    public void setDigit(int digit) {
        this.digit = digit;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idColor != null ? idColor.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InColor)) {
            return false;
        }
        InColor other = (InColor) object;
        if ((this.idColor == null && other.idColor != null) || (this.idColor != null && !this.idColor.equals(other.idColor))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.InColor[ idColor=" + idColor + " ]";
    }
    
}
